﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ev.CaiPiao
{
    public partial class Login : Form
    {
        public dl loginUser { get; set; }

        public Login()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var strid = textBox1.Text;
            var strpwd = textBox2.Text;

            var model = new Task().loginUser(strid, strpwd);

            if (model != null && model.UID > 0)
            {
                loginUser = model;
                //登录成功
                this.Close();
                return;
            }
            MessageBox.Show("账号密码错误");

        }
    }
}
